//
// Created by Szper on 2018/4/16.
//

#ifndef COMPILER_TOKEN_H
#define COMPILER_TOKEN_H
#include "SolveCenter.h"
#include "Head.h"
using namespace std;
class Token{
public:
    Token(char* ifilename, char* ofilename);
    ~Token();
    char* getRes();
    void readIfile();
    void writeOfile();
    void destroy();
    int getResLength();
    void Solve();
    //void ClearToken();
    SolveCenter* getSolve();
private:
    char res[20001];
    FILE *ifile, *ofile;
    int resLength;
    int syn;
    SolveCenter *solve;
    string ifilename;
    string ofilename;
    char tocken[21];
};
#endif //COMPILER_TOKEN_H
